package main

import (
	"fmt"
	"net/http"
	_ "net/http/pprof"
)

// 内置监控服务：http://127.0.0.1:6060/debug/pprof/
func main() {
	// 开启pprof，监听请求  _ "net/http/pprof" 导入后，默认开启
	// 以下代码只是为了方便讲监控地址暴露出去
	ip := "0.0.0.0:6060"
	if err := http.ListenAndServe(ip, nil); err != nil {
		fmt.Printf("start pprof failed on %s\n", ip)
	}
}
